package com.AAA.controller.mht;

import com.AAA.entity.LayData;
import com.AAA.entity.mht.TMhtRecordDedtail;
import com.AAA.service.mht.ITmhtRecordDedtailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("tmhtRecordDedtail")
public class TmhtRecordDedtailController {
    @Autowired
    private ITmhtRecordDedtailService service;

    @PostMapping("add")
    public LayData add(@RequestBody List<TMhtRecordDedtail> dedtails){
      return new LayData(service.add(dedtails));
    }
    @GetMapping ("{id}")
    public LayData getMhtResult(@PathVariable Integer id){
        return new LayData(service.getMhtResult(id));
    }

}
